package com.wnn.demo.domain;


import com.wnn.demo.domain.Accessory;
import com.wnn.demo.domain.Feedback;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.stereotype.Component;

import javax.persistence.Id;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
@Component
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Task implements Serializable {

    private static final long serialVersionUID = 1L;

    //	任务id
    @Id
    @ApiModelProperty(value = "任务id", name = "id", dataType = "String")
    private String id;

    //  创建人id
    @ApiModelProperty(value = "创建人id", name = "userId", dataType = "String")
    private String userId;

    //任务名称
    @ApiModelProperty(value = "任务名称", name = "taskName", dataType = "String")
    private String taskName;

    //任务内容
    @ApiModelProperty(value = "任务内容", name = "content", dataType = "String")
    private String content;

    //任务积分
    @ApiModelProperty(value = "任务积分", name = "integral", dataType = "Integer")
    private Integer integral;

    //	审批开始时间
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "审批开始时间", name = "approveBeginTime", dataType = "Date")
    private Date approveBeginTime;

    //	审批结束时间
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "审批结束时间", name = "approveEndTime", dataType = "Date")
    private Date approveEndTime;

    //	附件
    @ApiModelProperty(value = "附件", name = "accessory", dataType = "String")
    private String accessory;

    //	创建人
    @ApiModelProperty(value = "创建人", name = "createBy", dataType = "String")
    private String createBy;

    //	任务完成人
    @ApiModelProperty(value = "任务完成人", name = "finishBy", dataType = "String")
    private String finishBy;

    //	任务完成状态
    @ApiModelProperty(value = "任务完成状态", name = "taskStatus", dataType = "Integer")
    private Integer taskStatus;

    //	任务完成时间
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "任务完成时间", name = "finishTime", dataType = "Date")
    private Date finishTime;

    //	附件集合
    @ApiModelProperty(value = "附件集合", name = "accessories", dataType = "List<Accessory>")
    private List<Accessory> accessories;

    //	审批状态：0.草稿，1.审批中，2.审批成功，3.审批失败
    @ApiModelProperty(value = "审批状态：0.草稿，1.审批中，2.审批成功，3.审批失败", name = "status", dataType = "Integer")
	private Integer status;

    //	创建时间
    @ApiModelProperty(value = "创建时间", name = "createTime", dataType = "Date")
	private Date createTime;

    //	修改时间
    @ApiModelProperty(value = "修改时间", name = "updateTime", dataType = "Date")
    private Date updateTime;

    //   是否已删除：0未删除 1已删除
    @ApiModelProperty(value = "是否已删除：0未删除 1已删除", name = "isDeleted", dataType = "Integer")
    private Integer isDeleted;

    //  附件路径
    @ApiModelProperty(value = "附件路径", name = "hiddenFilePath", dataType = "String")
    private String hiddenFilePath;

    //评价反馈信息
    @ApiModelProperty(value = "评价反馈信息", name = "feedback", dataType = "Feedback")
    private Feedback feedback;

    //    事件上报信息
    @ApiModelProperty(value = "事件上报信息", name = "event", dataType = "Event")
    private Event event;

}
